package com.qf.dao;

import com.qf.pojo.Role;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.web.bind.annotation.PathVariable;

import java.util.List;
import java.util.Set;

public interface RoleDao {
    @Select("SELECT r.name FROM sys_role r LEFT " +
            "JOIN sys_user_role ur ON r.`id`=ur.r_id LEFT " +
            "JOIN sys_users u ON u.`id`=ur.`u_id` " +
            "WHERE u.`id`=#{uid}")
    Set<String> findRoleByUid(@Param("uid") Integer uid);

}
